<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateExpressTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('express', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->char('code', 5)->unique()->comment('快递代码');
            $table->string('name', 50)->comment('快递名称');
            $table->char('customs_code', 10)->comment('海关快递代码');
            $table->string('customs_name', 50)->comment('海关快递名称');
            $table->tinyInteger('status')->default(0)->comment('快递是否启用: 0 可用 1 不可用');
            $table->string('phone', 20)->comment('联系电话');
            $table->string('contacts', 20)->comment('联系人');
            $table->double('insured', 9, 2)->default(0)->comment('保费');
            $table->string('remark', 1000)->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('express');
    }
}
